require 'InterpreterFactory.rb'

class AirportClient
  factory = InterpreterFactory.new()
  
  begin
    int = factory.getVersionInterpreter()
    puts('interpreter.version.query')
    puts(int.version().query())
  rescue Exception 
    puts($!)
  end
  
  begin
    int = factory.getAirportsInterpreter
    puts('')
    puts('interpreter.flydays("DLH169").query')
    puts(int.flydays('DLH169').query)
  rescue Exception 
    puts($!)
  end
  
  begin
    int = factory.getAirportsInterpreter
    puts('')
    puts('interpreter.connectingAirports("DLH169").query')
    puts(int.connectingAirports('DLH169').query)
  rescue Exception 
    puts($!)
  end
  
  begin
    int = factory.getAirportsInterpreter
    puts('')
    puts('interpreter.destinations("VIE").query')
    puts(int.destinations('VIE').query)
  rescue Exception 
    puts($!)
  end
  
  begin
    int = factory.getAirportsInterpreter
    puts('')
    puts('interpreter.airlines().airports().query')
    puts(int.airlines().airports().query)
  rescue Exception 
    puts($!)
  end
   
end